package com.craterhill.java.ccp.dao;


import java.sql.ResultSet;
import java.sql.SQLException;


import com.craterhill.java.ccp.common.beans.StaffLog;
import com.craterhill.java.ccp.dao.impl.AbstractDao;
import com.craterhill.java.ccp.dao.utils.CCPResultSetExtractor;

public interface StaffLogsDao extends CCPDao<StaffLog> {
	public final String FIELD_LIST = " obj.staff_log_id, obj.staff_log_time " + AbstractDao.MONITER_FIELDS;
	
	public final String FIND_ALL_STAFFLOGS = " select " + FIELD_LIST + " from staff_logs obj ";
	
	public final class StaffLogsExtractor extends CCPResultSetExtractor<StaffLog> {
		
		@Override
		protected StaffLog extractResultSetData(ResultSet resultSet) throws SQLException {
			StaffLog stafflogs = new StaffLog();
			stafflogs.setStaffLogId(resultSet.getInt(1));
			stafflogs.setStaffLogTime(resultSet.getDate(2));
			stafflogs.setStatus(resultSet.getBoolean(3));
			stafflogs.setCreatedBy(resultSet.getInt(4));
			stafflogs.setModifiedBy(resultSet.getInt(5));
			stafflogs.setCreatedDate(resultSet.getDate(6));
			stafflogs.setModifiedDate(resultSet.getDate(7));
			return stafflogs;
		
		}
	}

}
